const Router = require("koa-router")

const router = new Router({ prefix: "/messages" })

const { verifyAuth, verifyPermission } = require("../middleware/auth-middleware")
const { getMessages, setMessage, removeMessage } = require("../controller/messages-controller")

router.get("/", getMessages)
router.post("/", setMessage)
router.delete("/:messageId", verifyAuth, verifyPermission, removeMessage)

module.exports = router